using System;
using System.Collections.Generic;
using System.Text;

using EasySeries.Metier.Entites;

namespace EasySeries.Metier.Compareurs
{
    class AbonnementCompareur : System.Collections.IComparer
    {
        #region IComparer Membres

        public int Compare(object x, object y)
        {
            Serie serieX = (Serie)x;
            Serie serieY = (Serie)y;

            return System.String.Compare(serieX.Name, serieY.Name);
            // throw new Exception("The method or operation is not implemented.");
        }

        #endregion

        #region IComparer Membres

        int System.Collections.IComparer.Compare(object x, object y)
        {
            Abonnement abonnementX = (Abonnement)x;
            Abonnement abonnementY = (Abonnement)y;

            return System.String.Compare(abonnementX.Serie.Name, abonnementY.Serie.Name);
        }

        #endregion
    }
}
